﻿using System.Text.Json;
using WebApplication1.Cmds.Provider;
using WebApplication1.Model;
using WebApplication1.Tools;

namespace WebApplication1.Cmds.Imp
{
    public class HttpClientProvider : IProvider<string>
    {
        public async Task<string> Execute(HttpCmdArgModel args)
        {
            var res = await new HttpClient().Request(args.GetRquestUrl(), args.method, args.GetContent());
            return await res.HttpResponseMsg.Content.ReadAsStringAsync();
        }
    }
}
